package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class WindowSpecification implements WindowNameOrSpecification {

    private int beginIndex;
    private int endIndex;
    private Identifier existingWindowName;
    private WindowPartitionClause windowPartitionClause;
    private WindowOrderClause windowOrderClause;
    private WindowFrameClause windowFrameClause;

    public WindowSpecification(int beginIndex,
                               int endIndex,
                               Identifier existingWindowName,
                               WindowPartitionClause windowPartitionClause,
                               WindowOrderClause windowOrderClause,
                               WindowFrameClause windowFrameClause) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.existingWindowName = existingWindowName;
        this.windowPartitionClause = windowPartitionClause;
        this.windowOrderClause = windowOrderClause;
        this.windowFrameClause = windowFrameClause;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public Identifier getExistingWindowName() {
        return existingWindowName;
    }

    public WindowPartitionClause getWindowPartitionClause() {
        return windowPartitionClause;
    }

    public WindowOrderClause getWindowOrderClause() {
        return windowOrderClause;
    }

    public WindowFrameClause getWindowFrameClause() {
        return windowFrameClause;
    }

}
